<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8">
    <title>中国老虎</title>
    <!-- Le styles -->
	<link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://cdnjs.bootcss.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
    <![endif]-->
	<script type="text/javascript" language="javascript">
//让框架页自适应高度
     function iframeAutoFit()
     {
        try
        {
            if(window!=parent)
            {
                var a = parent.document.getElementsByTagName("IFRAME");
                for(var i=0; i<a.length; i++) //author:meizz
                {
                    if(a[i].contentWindow==window)
                    {
                        var h1=0, h2=0, d=document, dd=d.documentElement;
                        a[i].parentNode.style.height = a[i].offsetHeight +"px";
                        a[i].style.height = "10px";

                        if(dd && dd.scrollHeight) h1=dd.scrollHeight;
                        if(d.body) h2=d.body.scrollHeight;
                        var h=Math.max(h1, h2);

                        if(document.all) 
                        if(window.opera) 
                        a[i].style.height = a[i].parentNode.style.height = h +"px";
                    }
                }
            }
        }
        catch (ex){}
    }
    if(window.attachEvent)
    {
        window.attachEvent("onload",  iframeAutoFit);
        //window.attachEvent("onresize",  iframeAutoFit);
    }
    else if(window.addEventListener)
    {
        window.addEventListener('load',  iframeAutoFit,  false);
        //window.addEventListener('resize',  iframeAutoFit,  false);
    }
    //自适应高度结束
</script>
  </head>
  <body style="margin: 0px ;padding-left:7px;padding-right:7px;background-color:#f5f5f5;">

<?php
		include "../php/inc/public_header.php";
		//$path="/img1/uploads/shop/productImg/";
	
		$path="http://www.chinalaohu.com/modules/miniature.php?w=500&p=/uploads/shop/productImg/";
		$art_id			= $_REQUEST["artid"];

		
		$sql="SELECT * from new_weituo_art WHERE id='".$art_id."'";
		$db->query($sql);

		
		if($db->next_record()){
			$name=$db->f("aname");
			$content=$db->f("aexplain");
			$stime=$db->f("stime");
			$etime=$db->f("etime");
			$add=$db->f("add");
			$place=$db->f("place");
			$organizers=$db->f("organizers");
			$organizer=$db->f("organizer");
			$co_organizer=$db->f("co_organizer");
			$sponsor=$db->f("sponsor");
			$artist=$db->f("artist");
			$remark=$db->f("remark");
		}
		$s=date("m/d",strtotime($stime));
		$e=date("m/d",strtotime($etime));
		echo "<p style='margin-right:0px;margin-bottom:10px;margin-top:0px;margin-left:0px;'><span style='font-weight: bold;font-size:16px;'>".$name."</span ></p>
		<iframe id='frame_content' src='http://adio.chinalaohu.com/app/doc/artimg.php?artid=".$art_id."' scrolling=no frameborder=0
 onload='this.height=100'></iframe>
		

		
		<p><span style='font-weight: bold;font-size:16px;'>时间：</span >".$s."~".$e."<p>";
		if($place){
			echo "<p><span style='font-weight: bold;font-size:16px;'>展馆：</span >".$place."<p>";
		}
		if($organizers){
			echo "<p><span style='font-weight: bold;font-size:16px;'>主办单位：</span >".$organizers."<p>";
		}
		if($sponsor){
			echo "<p><span style='font-weight: bold;font-size:16px;'>主办人：</span >".$sponsor."<p>";
		}
		if($organizer){
			echo "<p><span style='font-weight: bold;font-size:16px;'>承办单位：</span >".$organizer."<p>";
		}
		if($co_organizer){
			echo "<p><span style='font-weight: bold;font-size:16px;'>协办单位：</span >".$co_organizer."<p>";
		}
		if($artist){
			echo "<p><span style='font-weight: bold;font-size:16px;'>参展艺术家：</span >".$artist."<p>";
		}
		if($remark){
			echo "<p><span style='font-weight: bold;font-size:16px;'>备注：</span >".$remark."<p>";
		}
		$content=nl2br($content);
		if(!$content){
			echo "<p style='margin-right:0px;margin-bottom:10px;margin-top:0px;margin-left:0px;'><span style='font-weight: bold;font-size:16px;'>详情介绍：</span ><br/>暂无介绍</p>";
		}else{
			echo "<p style='margin-right:0px;margin-bottom:10px;margin-top:0px;margin-left:0px;'><span style='font-weight: bold;font-size:16px;'>详情介绍：</span ><br/>".$content."</p>";
		}	/**/
		/*
	$page=$_GET['page'];//获取当前页数  
	$max=1;//设置每页显示图片最大张数  
	$path="darktea";  
	$handle = opendir($path); //当前目录  
	while (false !== ($file = readdir($handle))) { //遍历该php文件所在目录  
		list($filesname,$kzm)=explode(".",$file);//获取扩展名  
		if($kzm=="gif" or $kzm=="jpg" or $kzm=="JPG") { //文件过滤  
			if (!is_dir('./'.$file)) { //文件夹过滤  
			$array[]=$file;//把符合条件的文件名存入数组  
			$i++;//记录图片总张数  
			}  
		}  
	}  
	  
	for ($j=$max*$page;$j<($max*$page+$max)&&$j<$i;++$j){//循环条件控制显示图片张数  
	echo "<img widht=800 height=600 src='".$path."/".$array[$j]."'>";//输出图片数组  
	echo "<a href=".$path."/".$array[$j]."><img width=400 height=400 src=".$path."/".$array[$j]."></a><br>";  
	}  
	$Previous_page=$page-1;  
	$next_page=$page+1;  
	if ($Previous_page<0){  
		echo "上页";  
		echo "<a href='?artid=".$art_id."&page=".$next_page."'>下页</a>";  
	}  
	else if ($page<=$i/$max){  
		echo "<a href='?artid=".$art_id."&page=".$Previous_page."'>上页</a>";  
		echo "<a href='?artid=".$art_id."&page=".$next_page."'>下页</a>";}  
	else{  
		echo " <a href='?artid=".$art_id."&page=".$Previous_page."'>上页</a>";  
		echo "下页";  
	  
	}  
*/
	?>
<!--
<iframe src='http://adio.chinalaohu.com/app/doc/ceshi2.php' id='iframepage' name='iframepage' frameBorder=0 scrolling=no width='100%' onLoad='iFrameHeight()' ></iframe>


<script type="text/javascript" language="javascript">   
function iFrameHeight() {   
var ifm= document.getElementById("iframepage");   
var subWeb = document.frames ? document.frames["iframepage"].document : ifm.contentDocument;   
if(ifm != null && subWeb != null) {
   ifm.height = subWeb.body.scrollHeight;
}   
}   
</script>
-->
 <!--<iframe id="frame_content" src="http://adio.chinalaohu.com/app/doc/ceshi2.php?artId=". scrolling="no" frameborder="0"
 onload="this.height=100"></iframe>
 
-->
<script type="text/javascript">
function reinitIframe(){
var iframe = document.getElementById("frame_content");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height =  height;
}catch (ex){}
}
window.setInterval("reinitIframe()", 200);
</script>


  </body>
</html>